<?

class Qi_Gdata_Picasa_Photos extends ArrayIterator
{
	private $_attributes = array();

	public function __construct($user, $album)
	{
		$url = "http://picasaweb.google.com/data/feed/api/user/$user/album/$album";
		$antes = microtime(true);
		$sxml = simplexml_load_file($url);
		$this->fetch_time = microtime(true) - $antes;
		$this->photos = array();
		foreach($sxml->entry as $entry):
			$photo = new Qi_Gdata_Picasa_Photo($entry);
			$this->photos[$photo->id] = $photo;
		endforeach;
		parent::__construct($this->photos);
	}
}

?>